<?php if (isset($list) && $list->num_rows() > 0) : ?>
<?php foreach($list->result() as $value) : ?>
<li data-id="<?php echo $value->id; ?>" class="am-cf">
    <span class="lotery-time"><?php echo str_replace(' ', '<br>', $value->created_at); ?></span>
    <span class="userName"><?php echo $value->user_name; ?></span>
    <span><?php echo ($value->today_total - $value->today_num); ?></span>
    <span><?php echo $value->weight; ?></span>

    <div class="am-modal user-detail-modal" id="user-detail-modal<?php echo $value->id; ?>">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">抽奖用户详情
              <a href="javascript: void(0)" class="am-close iconfont" data-am-modal-close>&#xe62f;</a>
            </div>
            <div class="am-modal-bd">
                <ul>
                    <li>
                        <p class="line_1">用户名</p>
                        <p><?php echo substr($value->user_name, 0, 1), '***', substr($value->user_name, -1);; ?></p>
                    </li>
                    <li>
                        <p class="line_1">抽奖次数</p>
                        <p><?php echo ($value->today_total - $value->today_num); ?></p>
                    </li>
                    <li>
                        <p class="line_1">中奖次数</p>
                        <p><?php echo $value->weight; ?></p>
                    </li>
                    <li>
                        <p class="line_1">抽奖时间</p>
                        <p><?php echo $value->created_at; ?></p>
                    </li>
                </ul>
            </div>
        </div>
    </div>

</li>
<?php endforeach; ?>
<?php endif; ?>